---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  annotations:
    user-authz.deckhouse.io/access-level: User
  name: d8:user-authz:prometheus-metrics-adapter:user
  {{- include "helm_lib_module_labels" (list .) | nindent 2 }}
rules:
- apiGroups:
  - deckhouse.io
  resources:
  - clusterdaemonsetmetrics
  - clusterdeploymentmetrics
  - clusteringressmetrics
  - clusterpodmetrics
  - clusterservicemetrics
  - clusterstatefulsetmetrics
  - daemonsetmetrics
  - deploymentmetrics
  - ingressmetrics
  - podmetrics
  - servicemetrics
  - statefulsetmetrics
  - namespacemetrics
  verbs:
  - get
  - list
  - watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  annotations:
    user-authz.deckhouse.io/access-level: Editor
  name: d8:user-authz:prometheus-metrics-adapter:editor
  {{- include "helm_lib_module_labels" (list .) | nindent 2 }}
rules:
- apiGroups:
  - deckhouse.io
  resources:
  - deploymentmetrics
  - ingressmetrics
  - podmetrics
  - servicemetrics
  - statefulsetmetrics
  - namespacemetrics
  verbs:
  - create
  - delete
  - deletecollection
  - patch
  - update
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  annotations:
    user-authz.deckhouse.io/access-level: ClusterEditor
  name: d8:user-authz:prometheus-metrics-adapter:cluster-editor
  {{- include "helm_lib_module_labels" (list .) | nindent 2 }}
rules:
- apiGroups:
  - deckhouse.io
  resources:
  - clusterdeploymentmetrics
  - clusteringressmetrics
  - clusterpodmetrics
  - clusterservicemetrics
  - clusterstatefulsetmetrics
  verbs:
  - create
  - delete
  - deletecollection
  - patch
  - update
